#include<iostream>
#include<string>

using namespace std;

int main()
{
	string s1, s2;

	getline(cin, s1);
	getline(cin, s2);

	auto pos = s1.find(s2);

	if(pos != string::npos)
		cout << s2 << " is the substring of " << s1 << endl;
	else
		cout << s2 << " is not the substring of " << s1 << endl;

	return 0;
}



